package com.eedi.framework.permission.controller.org.vo.role;

import com.eedi.framework.common.enums.CommonStatusEnum;
import com.eedi.framework.common.enums.UserTypeEnum;
import com.eedi.framework.permission.enums.OrgRoleTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Schema(description = "协同界面 - 角色创建 Request VO")
@Data
public class SysOrgRoleCreateReq {
    @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员")
    @NotBlank(message = "角色名称不能为空")
    @Size(max = 30, message = "角色名称长度不能超过30个字符")
    private String orgRoleName;

    @NotBlank(message = "角色标志不能为空")
    @Size(max = 100, message = "角色标志长度不能超过100个字符")
    @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ADMIN")
    private String orgRoleCode;

    @Schema(description = "角色类型", example = "2")
    private OrgRoleTypeEnum orgRoleType;

    @Schema(description = "用户类型：0 系统端 99 管理端", requiredMode = Schema.RequiredMode.REQUIRED, example = "15021")
    @NotNull(message = "用户类型不能为空")
    private UserTypeEnum orgUserType;

    @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "显示顺序不能为空")
    private Integer orgRoleSort;

    @Schema(description = "备注", example = "我是一个角色")
    private String orgRoleRemark;

    private String orgInfoId;

    /**
     * 角色状态
     * 枚举 {@link CommonStatusEnum}
     */
    @Schema(description = "角色状态")
    private CommonStatusEnum orgRoleStatus;
}
